<?php
/*
 * Squelette : dist/rubrique.html
 * Date :      Wed, 20 Sep 2006 11:46:21 GMT
 * Compile :   Mon, 20 Nov 2006 17:11:04 GMT (0.20s)
 * Boucles :   _rubriques_soeurs, _hierarchie, _breves_rubrique, _rubriques_mots, _mots, _sous_sous_rubriques, _sous_rubriques, _syndic, _sites, _documents_joints, _auteurs_recents, _articles_recents, _rubrique_principal
 */ 
//
// <BOUCLE rubriques>
//
function BOUCLE_rubriques_soeurshtml_83bf408618b32321d65c1b63ab0c286b(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
	$old_lang = $GLOBALS['spip_lang'];

	// REQUETE
	$result = spip_abstract_select(
		array("rubriques.id_rubrique",
		"rubriques.descriptif",
		"rubriques.titre",
		"rubriques.lang"), # SELECT
		array("spip_rubriques AS rubriques"), # FROM
		array("rubriques.id_parent='".$Pile[$SP]['id_parent']."'",
		"rubriques.id_rubrique!='".$Pile[$SP]['id_rubrique']."'",
		"rubriques.statut='publie'"), # WHERE
		'', # GROUP
		array('rubriques.titre'), # ORDER
		'', # LIMIT
		'', # sous
		'', # HAVING
		'rubriques', # table
		'_rubriques_soeurs', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_rubrique'][$Pile[$SP]['id_rubrique']] = 1; // invalideurs
		if (!$GLOBALS['forcer_lang'])
	 		$GLOBALS['spip_lang'] = ($x = $Pile[$SP]['lang']) ? $x : $old_lang;
		$t0 .= ('
	<li class="menu-item"><a href="' .
htmlspecialchars(vider_url(generer_url_rubrique($Pile[$SP]['id_rubrique']))) .
'" ' .
(($t1 = interdire_scripts(entites_html(textebrut(traiter_raccourcis_doublon($doublons,$Pile[$SP]['descriptif']))))) ?
			('title="' . $t1 . '"') :
			('')) .
'>' .
interdire_scripts(typo_doublon($doublons,$Pile[$SP]['titre'])) .
'</a></li>
');
	}

	$GLOBALS['spip_lang'] = $old_lang;
	@spip_abstract_free($result,'');
	return $t0;
}


//
// <BOUCLE hierarchie>
//
function BOUCLE_hierarchiehtml_83bf408618b32321d65c1b63ab0c286b(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
	$old_lang = $GLOBALS['spip_lang'];
	$hierarchie = calculer_hierarchie($Pile[$SP]['id_rubrique'], false);

	// REQUETE
	$result = spip_abstract_select(
		array("rubriques.id_parent",
		"rubriques.id_rubrique",
		"rubriques.descriptif",
		"rubriques.titre",
		"FIND_IN_SET(id_rubrique, '$hierarchie')-1 AS rang",
		"rubriques.lang"), # SELECT
		array("spip_rubriques AS rubriques"), # FROM
		array("id_rubrique IN ($hierarchie)"), # WHERE
		'', # GROUP
		array(rang), # ORDER
		'', # LIMIT
		'', # sous
		'', # HAVING
		'rubriques', # table
		'_hierarchie', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_rubrique'][$Pile[$SP]['id_rubrique']] = 1; // invalideurs
		if (!$GLOBALS['forcer_lang'])
	 		$GLOBALS['spip_lang'] = ($x = $Pile[$SP]['lang']) ? $x : $old_lang;
		$t0 .= ('
<li>
<div class="menu-titre"><a href="' .
htmlspecialchars(vider_url(generer_url_rubrique($Pile[$SP]['id_rubrique']))) .
'" ' .
(($t1 = interdire_scripts(entites_html(textebrut(traiter_raccourcis_doublon($doublons,$Pile[$SP]['descriptif']))))) ?
			('title="' . $t1 . '"') :
			('')) .
'>' .
interdire_scripts(typo_doublon($doublons,$Pile[$SP]['titre'])) .
'</a></div>
' .
(($t1 = BOUCLE_rubriques_soeurshtml_83bf408618b32321d65c1b63ab0c286b($Cache, $Pile, $doublons, $Numrows, $SP)) ?
			('
	<ul class="menu-liste">
' . $t1 . '
	</ul>
') :
			('')) .
'
</li>
');
	}

	$GLOBALS['spip_lang'] = $old_lang;
	@spip_abstract_free($result,'');
	return $t0;
}


//
// <BOUCLE breves>
//
function BOUCLE_breves_rubriquehtml_83bf408618b32321d65c1b63ab0c286b(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
	$old_lang = $GLOBALS['spip_lang'];

	// REQUETE
	$result = spip_abstract_select(
		array("breves.date_heure",
		"breves.id_breve",
		"breves.titre",
		"breves.lang"), # SELECT
		array("spip_breves AS breves"), # FROM
		array("(breves.id_rubrique = '" . addslashes($Pile[$SP]['id_secteur']) . "')",
		"breves.statut='publie'"), # WHERE
		'', # GROUP
		array('breves.date_heure' . ' DESC'), # ORDER
		'0,5', # LIMIT
		'', # sous
		'', # HAVING
		'breves', # table
		'_breves_rubrique', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_breve'][$Pile[$SP]['id_breve']] = 1; // invalideurs
		if (!$GLOBALS['forcer_lang'])
	 		$GLOBALS['spip_lang'] = ($x = $Pile[$SP]['lang']) ? $x : $old_lang;
		$t0 .= ('
	<li class="menu-item">
	<i>' .
affdate_court(vider_date($Pile[$SP]['date_heure'])) .
'</i>:
	<a href="' .
htmlspecialchars(vider_url(generer_url_breve($Pile[$SP]['id_breve']))) .
'">' .
interdire_scripts(typo_doublon($doublons,$Pile[$SP]['titre'])) .
'</a>
	</li>
');
	}

	$GLOBALS['spip_lang'] = $old_lang;
	@spip_abstract_free($result,'');
	return $t0;
}


//
// <BOUCLE rubriques>
//
function BOUCLE_rubriques_motshtml_83bf408618b32321d65c1b63ab0c286b(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
	$old_lang = $GLOBALS['spip_lang'];

	// REQUETE
	$result = spip_abstract_select(
		array("rubriques.id_rubrique",
		"RAND() AS alea",
		"rubriques.descriptif",
		"rubriques.titre",
		"rubriques.lang"), # SELECT
		array("spip_mots_rubriques AS mots_rubriques1","spip_rubriques AS rubriques"), # FROM
		array("rubriques.id_rubrique=mots_rubriques1.id_rubrique",
		"(mots_rubriques1.id_mot = '" . addslashes($Pile[$SP]['id_mot']) . "')",
		"rubriques.statut='publie'"), # WHERE
		'rubriques.id_rubrique', # GROUP
		array('alea'), # ORDER
		'0,4', # LIMIT
		'', # sous
		'', # HAVING
		'rubriques', # table
		'_rubriques_mots', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_rubrique'][$Pile[$SP]['id_rubrique']] = 1; // invalideurs
		if (!$GLOBALS['forcer_lang'])
	 		$GLOBALS['spip_lang'] = ($x = $Pile[$SP]['lang']) ? $x : $old_lang;
		$t0 .= ('
		<li class="menu-item"><a href="' .
htmlspecialchars(vider_url(generer_url_rubrique($Pile[$SP]['id_rubrique']))) .
'" title="' .
interdire_scripts(entites_html(textebrut(traiter_raccourcis_doublon($doublons,$Pile[$SP]['descriptif'])))) .
'">' .
interdire_scripts(typo_doublon($doublons,$Pile[$SP]['titre'])) .
'</a></li>
	');
	}

	$GLOBALS['spip_lang'] = $old_lang;
	@spip_abstract_free($result,'');
	return $t0;
}


//
// <BOUCLE mots>
//
function BOUCLE_motshtml_83bf408618b32321d65c1b63ab0c286b(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {

	// REQUETE
	$result = spip_abstract_select(
		array("mots.id_mot",
		"mots.id_mot",
		"mots.descriptif",
		"mots.titre"), # SELECT
		array("spip_mots_rubriques AS mots_rubriques2","spip_mots AS mots"), # FROM
		array("mots.id_mot=mots_rubriques2.id_mot",
		"(mots_rubriques2.id_rubrique = '" . addslashes($Pile[$SP]['id_rubrique']) . "')"), # WHERE
		'mots.id_mot', # GROUP
		array('mots.titre'), # ORDER
		'', # LIMIT
		'', # sous
		'', # HAVING
		'mots', # table
		'_mots', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_mot'][$Pile[$SP]['id_mot']] = 1; // invalideurs

		$t0 .= ('
	<li>
	<div class="menu-titre"><a href="' .
htmlspecialchars(vider_url(generer_url_mot($Pile[$SP]['id_mot']))) .
'" ' .
(($t1 = interdire_scripts(entites_html(textebrut(traiter_raccourcis_doublon($doublons,$Pile[$SP]['descriptif']))))) ?
			('title="' . $t1 . '"') :
			('')) .
'>' .
interdire_scripts(typo_doublon($doublons,$Pile[$SP]['titre'])) .
'</a></div>
	' .
(($t1 = BOUCLE_rubriques_motshtml_83bf408618b32321d65c1b63ab0c286b($Cache, $Pile, $doublons, $Numrows, $SP)) ?
			('
		<ul class="menu-liste">
	' . $t1 . '
		</ul>
	') :
			('')) .
'
	</li>
	');
	}

	@spip_abstract_free($result,'');
	return $t0;
}


//
// <BOUCLE rubriques>
//
function BOUCLE_sous_sous_rubriqueshtml_83bf408618b32321d65c1b63ab0c286b(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
	$old_lang = $GLOBALS['spip_lang'];

	// REQUETE
	$result = spip_abstract_select(
		array("rubriques.id_rubrique",
		"rubriques.descriptif",
		"rubriques.titre",
		"rubriques.lang"), # SELECT
		array("spip_rubriques AS rubriques"), # FROM
		array("(rubriques.id_parent = '" . addslashes($Pile[$SP]['id_rubrique']) . "')",
		"rubriques.statut='publie'"), # WHERE
		'', # GROUP
		array('rubriques.titre'), # ORDER
		'', # LIMIT
		'', # sous
		'', # HAVING
		'rubriques', # table
		'_sous_sous_rubriques', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_rubrique'][$Pile[$SP]['id_rubrique']] = 1; // invalideurs
		if (!$GLOBALS['forcer_lang'])
	 		$GLOBALS['spip_lang'] = ($x = $Pile[$SP]['lang']) ? $x : $old_lang;
		$t0 .= ('
		<li class="menu-item"><a href="' .
htmlspecialchars(vider_url(generer_url_rubrique($Pile[$SP]['id_rubrique']))) .
'" ' .
(($t1 = interdire_scripts(entites_html(textebrut(traiter_raccourcis_doublon($doublons,$Pile[$SP]['descriptif']))))) ?
			('title="' . $t1 . '"') :
			('')) .
'>' .
interdire_scripts(typo_doublon($doublons,$Pile[$SP]['titre'])) .
'</a></li>
	');
	}

	$GLOBALS['spip_lang'] = $old_lang;
	@spip_abstract_free($result,'');
	return $t0;
}


//
// <BOUCLE rubriques>
//
function BOUCLE_sous_rubriqueshtml_83bf408618b32321d65c1b63ab0c286b(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
	$old_lang = $GLOBALS['spip_lang'];

	// REQUETE
	$result = spip_abstract_select(
		array("rubriques.id_rubrique",
		"rubriques.descriptif",
		"rubriques.titre",
		"rubriques.lang"), # SELECT
		array("spip_rubriques AS rubriques"), # FROM
		array("(rubriques.id_parent = '" . addslashes($Pile[$SP]['id_rubrique']) . "')",
		"rubriques.statut='publie'"), # WHERE
		'', # GROUP
		array('rubriques.titre'), # ORDER
		'', # LIMIT
		'', # sous
		'', # HAVING
		'rubriques', # table
		'_sous_rubriques', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_rubrique'][$Pile[$SP]['id_rubrique']] = 1; // invalideurs
		if (!$GLOBALS['forcer_lang'])
	 		$GLOBALS['spip_lang'] = ($x = $Pile[$SP]['lang']) ? $x : $old_lang;
		$t0 .= ('
	<li>
	<div class="menu-titre"><a href="' .
htmlspecialchars(vider_url(generer_url_rubrique($Pile[$SP]['id_rubrique']))) .
'" ' .
(($t1 = interdire_scripts(entites_html(textebrut(traiter_raccourcis_doublon($doublons,$Pile[$SP]['descriptif']))))) ?
			('title="' . $t1 . '"') :
			('')) .
'>' .
interdire_scripts(typo_doublon($doublons,$Pile[$SP]['titre'])) .
'</a></div>
	' .
(($t1 = BOUCLE_sous_sous_rubriqueshtml_83bf408618b32321d65c1b63ab0c286b($Cache, $Pile, $doublons, $Numrows, $SP)) ?
			('
		<ul class="menu-liste">
	' . $t1 . '
		</ul>
	') :
			('')) .
'
	</li>
	');
	}

	$GLOBALS['spip_lang'] = $old_lang;
	@spip_abstract_free($result,'');
	return $t0;
}


//
// <BOUCLE syndic_articles>
//
function BOUCLE_syndichtml_83bf408618b32321d65c1b63ab0c286b(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {

	// REQUETE
	$result = spip_abstract_select(
		array("syndic_articles.url",
		"syndic_articles.titre",
		"syndic_articles.id_syndic_article"), # SELECT
		array("spip_syndic_articles  AS syndic_articles","spip_syndic AS syndic"), # FROM
		array("(syndic.id_syndic = '" . addslashes($Pile[$SP]['id_syndic']) . "')",
		"syndic_articles.id_syndic=syndic.id_syndic",
		"syndic_articles.statut='publie'",
		"syndic.statut='publie'"), # WHERE
		'', # GROUP
		array('syndic_articles.date' . ' DESC'), # ORDER
		'0,3', # LIMIT
		'', # sous
		'', # HAVING
		'syndic_articles', # table
		'_syndic', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_syndic_article'][$Pile[$SP]['id_syndic_article']] = 1; // invalideurs

		$t0 .= ('
			<li class="menu-item"><small><a href="' .
htmlspecialchars(vider_url($Pile[$SP]['url'])) .
'">' .
interdire_scripts(safehtml(typo_doublon($doublons,$Pile[$SP]['titre']))) .
'</a></small></li>
		');
	}

	@spip_abstract_free($result,'');
	return $t0;
}


//
// <BOUCLE syndication>
//
function BOUCLE_siteshtml_83bf408618b32321d65c1b63ab0c286b(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {

	// REQUETE
	$result = spip_abstract_select(
		array("syndic.id_syndic",
		"syndic.url_site",
		"syndic.nom_site"), # SELECT
		array("spip_syndic AS syndic"), # FROM
		array("(syndic.id_rubrique = '" . addslashes($Pile[$SP]['id_rubrique']) . "')",
		"syndic.statut='publie'"), # WHERE
		'', # GROUP
		array('syndic.nom_site'), # ORDER
		'', # LIMIT
		'', # sous
		'', # HAVING
		'syndic', # table
		'_sites', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_syndic'][$Pile[$SP]['id_syndic']] = 1; // invalideurs

		$t0 .= ('
		<li class="menu-item">
		<a href="' .
interdire_scripts(htmlspecialchars(vider_url($Pile[$SP]['url_site']))) .
'">' .
interdire_scripts(typo_doublon($doublons,$Pile[$SP]['nom_site'])) .
'</a>
		' .
(($t1 = BOUCLE_syndichtml_83bf408618b32321d65c1b63ab0c286b($Cache, $Pile, $doublons, $Numrows, $SP)) ?
			('
		<ul class="menu-liste">
		' . $t1 . '
		</ul>
		') :
			('')) .
'
		</li>
	');
	}

	@spip_abstract_free($result,'');
	return $t0;
}


//
// <BOUCLE documents>
//
function BOUCLE_documents_jointshtml_83bf408618b32321d65c1b63ab0c286b(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {

	// REQUETE
	$result = spip_abstract_select(
		array("documents.id_document",
		"documents.titre",
		"documents.descriptif"), # SELECT
		array("spip_documents_rubriques AS documents_rubriques3","spip_documents AS documents","spip_types_documents AS types_documents"), # FROM
		array("documents.id_document=documents_rubriques3.id_document",
		"(documents_rubriques3.id_rubrique = '" . addslashes($Pile[$SP]['id_rubrique']) . "')",
		"(documents.mode = '" . addslashes('document') . "')",
		"" .calcul_mysql_in('documents.id_document', "0".$doublons[$doublons_index = ('documents' . '')], 'NOT') . "",
		"documents.id_type=types_documents.id_type",
		"(documents.taille > 0 OR documents.distant='oui')"), # WHERE
		'documents.id_document', # GROUP
		array(), # ORDER
		'', # LIMIT
		'', # sous
		'', # HAVING
		'documents', # table
		'_documents_joints', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_document'][$Pile[$SP]['id_document']] = 1; // invalideurs
		$doublons[$doublons_index] .= ','. $Pile[$SP]['id_document']; // doublons

		$t1 = ('
' .
calcule_logo_document($Pile[$SP]['id_document'], '1', $doublons, 0, htmlspecialchars(vider_url(generer_url_document($Pile[$SP]['id_document']))), '', '') .
(($t1 = interdire_scripts(typo_doublon($doublons,$Pile[$SP]['titre']))) ?
			('<br />' . $t1) :
			('')) .
(($t1 = interdire_scripts(traiter_raccourcis_doublon($doublons,$Pile[$SP]['descriptif']))) ?
			(' - ' . $t1) :
			('')) .
'
');
		$t0 .= (($t1 && $t0) ? '<br />' : '') . $t1;
	}

	@spip_abstract_free($result,'');
	return $t0;
}


//
// <BOUCLE auteurs>
//
function BOUCLE_auteurs_recentshtml_83bf408618b32321d65c1b63ab0c286b(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {

	// REQUETE
	$result = spip_abstract_select(
		array("auteurs.id_auteur",
		"auteurs.nom"), # SELECT
		array("spip_auteurs_articles AS auteurs_articles4","spip_auteurs AS auteurs"), # FROM
		array("auteurs.id_auteur=auteurs_articles4.id_auteur",
		"(auteurs_articles4.id_article = '" . addslashes($Pile[$SP]['id_article']) . "')",
		"NOT(auteurs.statut='5poubelle')"), # WHERE
		'auteurs.id_auteur', # GROUP
		array(), # ORDER
		'', # LIMIT
		'', # sous
		'', # HAVING
		'auteurs', # table
		'_auteurs_recents', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_auteur'][$Pile[$SP]['id_auteur']] = 1; // invalideurs

		$t1 = interdire_scripts(typo_doublon($doublons,$Pile[$SP]['nom']));
		$t0 .= (($t1 && $t0) ? ', ' : '') . $t1;
	}

	@spip_abstract_free($result,'');
	return $t0;
}


//
// <BOUCLE articles>
//
function BOUCLE_articles_recentshtml_83bf408618b32321d65c1b63ab0c286b(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
	$old_lang = $GLOBALS['spip_lang'];

	// REQUETE
	$result = spip_abstract_select(
		array("articles.id_article",
		"articles.descriptif",
		"articles.titre",
		"articles.date",
		"articles.lang"), # SELECT
		array("spip_articles AS articles"), # FROM
		array("(articles.id_rubrique = '" . addslashes($Pile[$SP]['id_rubrique']) . "')",
		"articles.statut='publie'"), # WHERE
		'', # GROUP
		array('articles.titre'), # ORDER
		'', # LIMIT
		'', # sous
		'', # HAVING
		'articles', # table
		'_articles_recents', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_article'][$Pile[$SP]['id_article']] = 1; // invalideurs
		if (!$GLOBALS['forcer_lang'])
	 		$GLOBALS['spip_lang'] = ($x = $Pile[$SP]['lang']) ? $x : $old_lang;
		$t0 .= ('
	<h2><a href="' .
htmlspecialchars(vider_url(generer_url_article($Pile[$SP]['id_article']))) .
'" ' .
(($t1 = interdire_scripts(entites_html(textebrut(traiter_raccourcis_doublon($doublons,$Pile[$SP]['descriptif']))))) ?
			('title="' . $t1 . '"') :
			('')) .
'>' .
interdire_scripts(typo_doublon($doublons,$Pile[$SP]['titre'])) .
'</a></h2>
	<div class="detail">
	' .
nom_jour(vider_date($Pile[$SP]['date'])) .
' ' .
affdate(vider_date($Pile[$SP]['date'])) .
'
	' .
(($t1 = BOUCLE_auteurs_recentshtml_83bf408618b32321d65c1b63ab0c286b($Cache, $Pile, $doublons, $Numrows, $SP)) ?
			((_T('public/spip/ecrire:par_auteur') .
' ') . $t1) :
			('')) .
'
	</div>
	<br />
');
	}

	$GLOBALS['spip_lang'] = $old_lang;
	@spip_abstract_free($result,'');
	return $t0;
}


//
// <BOUCLE rubriques>
//
function BOUCLE_rubrique_principalhtml_83bf408618b32321d65c1b63ab0c286b(&$Cache, &$Pile, &$doublons, &$Numrows, $SP) {
	$old_lang = $GLOBALS['spip_lang'];

	// REQUETE
	$result = spip_abstract_select(
		array("rubriques.id_secteur",
		"rubriques.id_rubrique",
		"rubriques.lang",
		"rubriques.titre",
		"rubriques.date",
		"rubriques.texte"), # SELECT
		array("spip_rubriques AS rubriques"), # FROM
		array("(rubriques.id_rubrique = '" . addslashes($Pile[$SP]['id_rubrique']) . "')",
		"rubriques.statut='publie'"), # WHERE
		'', # GROUP
		array(), # ORDER
		'', # LIMIT
		'', # sous
		'', # HAVING
		'rubriques', # table
		'_rubrique_principal', # boucle
		''); # serveur
	$t0 = "";
	$SP++;

	// RESULTATS
	while ($Pile[$SP] = @spip_abstract_fetch($result,"")) {

		$Cache['id_rubrique'][$Pile[$SP]['id_rubrique']] = 1; // invalideurs
		if (!$GLOBALS['forcer_lang'])
	 		$GLOBALS['spip_lang'] = ($x = $Pile[$SP]['lang']) ? $x : $old_lang;
		$t0 .= ('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="' .
lang_dir(($Pile[$SP]['lang'] ? $Pile[$SP]['lang'] : $GLOBALS['spip_lang']),'ltr','rtl') .
'" lang="' .
htmlentities($Pile[$SP]['lang'] ? $Pile[$SP]['lang'] : $GLOBALS['spip_lang']) .
'">
<head>
<title>' .
interdire_scripts(textebrut(typo_doublon($doublons,$Pile[$SP]['titre']))) .
'</title>
<meta http-equiv="Content-Type" content="text/html; charset=' .
interdire_scripts(lire_meta('charset')) .
'" />

<!-- Ceci est la feuille de style par defaut pour les types internes a SPIP -->
<link rel="stylesheet" href="spip_style.css" type="text/css" />

<!-- Les feuilles de style specifiques aux presents squelettes -->
<link rel="stylesheet" href="' .
interdire_scripts('dist') .
'/typographie.css" type="text/css" />

<!-- media="..." permet de ne pas utiliser ce style sous Netscape 4 (sinon plantage) -->
<link rel="stylesheet" href="' .
interdire_scripts('dist') .
'/habillage.css" type="text/css" media="projection, screen, tv" />
<!-- media="print" permet d\'utiliser cette feuille de style quand vous imprimez depuis votre navigateur -->
<link rel="stylesheet" href="' .
interdire_scripts('dist') .
'/impression.css" type="text/css" media="print" />

<!-- Lien vers le backend pour navigateurs eclaires -->
<link rel="alternate" type="application/rss+xml" title="' .
_T('public/spip/ecrire:syndiquer_rubrique') .
'" href="backend.php?id_rubrique=' .
$Pile[$SP]['id_rubrique'] .
'" />
</head>

<body>

<div id="navigation">

<h1 class="structure">' .
_T('public/spip/ecrire:navigation') .
'</h1>

<!-- Menu de navigation general -->

<div class="menu">
<ul class="general">
	<li class="menu-titre">
	' .
(($t1 = interdire_scripts(htmlspecialchars(vider_url(lire_meta('adresse_site'))))) ?
			('<a href="' . $t1 . ('" title="' .
_T('public/spip/ecrire:accueil_site') .
'"><b>' .
interdire_scripts(typo_doublon($doublons,lire_meta('nom_site'))) .
'</b></a>')) :
			('')) .
'
	</li>
	<li class="menu-item">
	<a href="plan.php">' .
_T('public/spip/ecrire:plan_site') .
'</a>
	</li>
	<li class="menu-item">
	<a href="resume.php" title="' .
_T('public/spip/ecrire:articles_populaires') .
'">' .
_T('public/spip/ecrire:en_resume') .
'</a>
	</li>
	<li class="menu-item">
	<a href="ecrire/">' .
_T('public/spip/ecrire:espace_prive') .
'</a>
	</li>
</ul>
</div>


<!-- Formulaire de recherche -->

' .
executer_balise_dynamique('FORMULAIRE_RECHERCHE',
	array(),
	array(''), $GLOBALS['spip_lang'],47) .
'


<!-- Menu de navigation rubriques -->

<div class="menu">
<ol class="rubriques" title="' .
_T('public/spip/ecrire:hierarchie_site') .
'">
' .
BOUCLE_hierarchiehtml_83bf408618b32321d65c1b63ab0c286b($Cache, $Pile, $doublons, $Numrows, $SP) .
'
</ol>
</div>


<!-- Breves dans la rubrique -->

' .
(($t1 = BOUCLE_breves_rubriquehtml_83bf408618b32321d65c1b63ab0c286b($Cache, $Pile, $doublons, $Numrows, $SP)) ?
			(('

<div class="menu">
<div class="breves" title="' .
_T('public/spip/ecrire:dernieres_breves') .
'">
	<div class="menu-titre">
	' .
_T('public/spip/ecrire:breves') .
'
	</div>
	<ul>
') . $t1 . '
	</ul>
</div>
</div>

') :
			('')) .
'


</div>


<!-- Une : contenu de la rubrique -->

<div class="contenu" id="principal">

<div class="cartouche">
' .
affiche_logos(calcule_logo('RUBRIQUE', 'ON', $Pile[$SP]['id_rubrique'],sql_parent($Pile[$SP]['id_rubrique']),  '0'), '', 'left') .
'
<h1 class="titre-texte">' .
interdire_scripts(typo_doublon($doublons,$Pile[$SP]['titre'])) .
'</h1>
' .
(($t1 = nom_jour(vider_date($Pile[$SP]['date']))) ?
			((_T('public/spip/ecrire:dernier_ajout') .
' : ') . $t1) :
			('')) .
' ' .
(($t1 = affdate(vider_date($Pile[$SP]['date']))) ?
			($t1 . '.') :
			('')) .
'
</div>

	<div class="encart">

	<!-- Menu de navigation mots-cles -->

	' .
(($t1 = BOUCLE_motshtml_83bf408618b32321d65c1b63ab0c286b($Cache, $Pile, $doublons, $Numrows, $SP)) ?
			(('
	<h2 class="structure">' .
_T('public/spip/ecrire:mots_clefs') .
'</h2>

	<div class="menu">
	<ul class="divers" title="' .
_T('public/spip/ecrire:mots_clefs') .
'">
	') . $t1 . '
	</ul>
	</div>
	') :
			('')) .
'

	<!-- Sous-rubriques -->

	' .
(($t1 = BOUCLE_sous_rubriqueshtml_83bf408618b32321d65c1b63ab0c286b($Cache, $Pile, $doublons, $Numrows, $SP)) ?
			(('
	<h2 class="structure">' .
_T('public/spip/ecrire:sous_rubriques') .
'</h2>

	<div class="menu">
	<ul class="rubriques" title="' .
_T('public/spip/ecrire:sous_rubriques') .
'">
	') . $t1 . '
	</ul>
	</div>
	') :
			('')) .
'
	
	<!-- Sites syndiques -->
	
	' .
(($t1 = BOUCLE_siteshtml_83bf408618b32321d65c1b63ab0c286b($Cache, $Pile, $doublons, $Numrows, $SP)) ?
			(('
	<div class="menu">
	<div class="divers">
		<div class="menu-titre">
		' .
_T('public/spip/ecrire:sur_web') .
'
		</div>
		<ul>
	') . $t1 . '
		</ul>
	</div>
	</div>
	') :
			('')) .
'
	' .
(($t1 = executer_balise_dynamique('FORMULAIRE_SITE',
	array($Pile[$SP]['id_rubrique']),
	array(''), $GLOBALS['spip_lang'],182)) ?
			(('
<div class="menu">
    <div class="divers">
      <div class="menu-titre">' .
_T('public/spip/ecrire:proposer_site') .
'
	<div class=\'reponse_formulaire\'>') . $t1 . '</div>
      </div>
    </div>
</div>
') :
			('')) .
'
	</div>

' .
(($t1 = interdire_scripts(traiter_raccourcis_doublon($doublons,$Pile[$SP]['texte']))) ?
			('<div class="chapo">' . $t1 . '</div>') :
			('')) .
'
' .
(($t1 = interdire_scripts(calculer_notes())) ?
			('<div class="notes">' . $t1 . '</div>') :
			('')) .
'

' .
BOUCLE_documents_jointshtml_83bf408618b32321d65c1b63ab0c286b($Cache, $Pile, $doublons, $Numrows, $SP) .
'
<br />

<!-- Articles de la rubrique -->

<h1 class="structure">' .
_T('public/spip/ecrire:articles_rubrique') .
'</h1>

<div class="liste-articles">

' .
BOUCLE_articles_recentshtml_83bf408618b32321d65c1b63ab0c286b($Cache, $Pile, $doublons, $Numrows, $SP) .
'


</div>


</div>

</body>
</html>
');
	}

	$GLOBALS['spip_lang'] = $old_lang;
	@spip_abstract_free($result,'');
	return $t0;
}



//
// Fonction principale du squelette dist/rubrique.html
//
function html_83bf408618b32321d65c1b63ab0c286b ($Cache, $Pile, $doublons=array(), $Numrows='', $SP=0) {
$t0 = (BOUCLE_rubrique_principalhtml_83bf408618b32321d65c1b63ab0c286b($Cache, $Pile, $doublons, $Numrows, $SP) .
'
');

	return array(
		'texte' => $t0,
		'squelette' => 'html_83bf408618b32321d65c1b63ab0c286b',
		'process_ins' => ((strpos($t0,'<'.'?')=== false) ? 'html' : 'php'),
		'invalideurs' => $Cache
	);
}

?>